Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add cygwin support #2610

Merged
merged 13 commits into from
Mar 25, 2025
Merged

feat: add cygwin support #2610

merged 13 commits into from
Mar 25, 2025

Conversation

Berrysoft
Copy link
Contributor

@Berrysoft Berrysoft commented Feb 25, 2025

What does this PR do

This PR adds cygwin target support.

Tracking:

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@Berrysoft Berrysoft marked this pull request as ready for review March 7, 2025 16:13
@Berrysoft Berrysoft marked this pull request as draft March 8, 2025 14:56
@Berrysoft Berrysoft marked this pull request as ready for review March 10, 2025 10:15
@Berrysoft
Copy link
Contributor Author

The CI is broken:(

@Berrysoft Berrysoft marked this pull request as draft March 12, 2025 01:45
@Berrysoft Berrysoft marked this pull request as ready for review March 12, 2025 05:57
@SteveLauC
Copy link
Member

The CI is broken:(

Weird, let me take a look

@Berrysoft
Copy link
Contributor Author

Weird, let me take a look

Hello, @SteveLauC , if you are still looking at this:) I think it's because the latest version of once_cell updates its MSRV to 1.70, larger than the MSRV of nix, 1.69.

@SteveLauC
Copy link
Member

I think it's because the latest version of once_cell updates its MSRV

So was this newer version of once_cell updated by the libc crate?

@Berrysoft
Copy link
Contributor Author

So was this newer version of once_cell updated by the libc crate?

I don't think so. libc doesn't depend on once_cell. It is tempfile.

This repo doesn't commit the Cargo.lock. In the CI, cargo tries to find the latest version that satisifies the Cargo.toml, without considering the rust-version field in Cargo.toml (this problem has been solved with resolver 3, which is the default resolver in edition 2024).

However, it seems that once_cell published a new release recently to decrease the MSRV to 1.65. So a re-run of CI should solve the problem:)

@SteveLauC
Copy link
Member

Just re-ran the CI, and they failed because SOCK_PACKET was deprecated by rust-lang/libc#4267, but since it is used explicitly for testing so I think we can #[allow(deprecated)] here

@SteveLauC
Copy link
Member

SteveLauC commented Mar 18, 2025

Weird, the FreeBSD CI was still using once_cell 1.21.0 🤔

https://github.com/nix-rust/nix/pull/2610/checks?check_run_id=38692242745

@Berrysoft
Copy link
Contributor Author

Weird, the FreeBSD CI was still using once_cell 1.21.0

Failed 5 days ago. Not today.

@SteveLauC
Copy link
Member

Failed 5 days ago. Not today.

Hmm, sorry for missing that:D

@Berrysoft
Copy link
Contributor Author

Thank you @SteveLauC , now the CI passes again.

Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late review, the code part looks good. For the tests, some of them are "ignored" even though the corresponding symbols are available, I would like to know why, and if possible, it would be great to comment on the reason there, which would help maintenance a lot! :)

@SteveLauC SteveLauC mentioned this pull request Mar 21, 2025
3 tasks
@SteveLauC
Copy link
Member

Let me fix the unrelated nightly clippy warning

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@SteveLauC SteveLauC added this pull request to the merge queue Mar 25, 2025
Merged via the queue into nix-rust:master with commit 975111f Mar 25, 2025
40 checks passed
@Berrysoft Berrysoft deleted the dev/cygwin branch March 25, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants